import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import en from 'element-plus/es/locale/lang/en'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import store from '@/store'

export default app => {
    // 对element-plus/icon-vue中的所有图标进行全局注册
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
        app.component(key, component)
    }    

    app.use(ElementPlus,{
        locale: store.getters.language === 'en' ? en :zhCn
    })
}

  
